<?php
	//链接数据库
	$data = new mysqli('127.0.0.1','root','','friday');
	//设置中文
	mysqli_query($data,"SET NAMES utf8");
	//设置查询语句
	$sql = 'select * from address';
	//执行
	$query = mysqli_query($data,$sql);
	while($result=mysqli_fetch_assoc($query)){
		$arr[] = $result;
	}
	
	echo json_encode($arr);
	mysqli_close($data);
?>